<?php

namespace app\admin\model\assess;

use think\Model;


class Questions extends Model
{

    

    

    // 表名
    protected $name = 'assess_questions';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = true;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    protected $deleteTime = 'delete_time';

    // 追加属性
    protected $append = [

    ];
    

	public static function init(){
		self::afterDelete(function ($row) {
			$row->is_del = 1;
			$row->save();
		});
	}

	public static function getList(){
		$result = self::where(['is_del'=>0])->order('sort,id asc')->select();
		return collection($result)->toArray();
	}
    






}
